//public PageList queryAppMyOrders(String userId, OrderMainStatus mainStatus, List<OrderType> orderTypes, Integer pageSize, Integer pageNum) {
//        List<OrderHeadStatus> headStatuses = OrderHeadStatus.getOrderStatusByMainStatus(mainStatus);
//        PageList<OrderHead> pageList = orderHeadService.queryMyStoreOrders(userId, orderTypes, headStatuses, InviteOrderType.MAIN_ORDER, OrderMainStatus.getOrderBySql(mainStatus), pageSize, pageNum);
//        List<OrderHead> orderHeads = pageList.getItems();
//        orderHeadService.calculateOrderHeads(orderHeads, false);
//        if (CollectionUtil.isNotEmpty(orderTypes) && orderTypes.contains(OrderType.PHOTO_ORDER)) {
//            // 照片订单。
//            orderHeadService.getOrderTypeService(OrderType.PHOTO_ORDER).wrapAppOrders(orderHeads);
//            return pageList;
//        }
//        // 我的门店订单
//        List<String> orderNos = CollectionUtil.toList(orderHeads, OrderHead::getOrderNo);
//        Map<String, List<OrderDetail>> orderDetailMap = CollectionUtil.toGroup(orderDetailService.queryAppDetailsByOrderNos(orderNos), OrderDetail::getOrderNo);
//        CollectionUtil.getAndSetListByMap(orderHeads, orderDetailMap, OrderHead::getOrderNo, OrderHead::setOrderDetails);
//        Map<String, Store> storeMap = CollectionUtil.toMap(storeService.getOrderStoresByOrderNos(CollectionUtil.toList(orderHeads, OrderHead::getStoreId)), Store::getStoreId);
//        CollectionUtil.getAndSetModelByMap(orderHeads, storeMap, OrderHead::getStoreId, OrderHead::setStore);
//        // 包装明细
//        List<OrderDetail> orderDetails = new ArrayList<>();
//        orderHeads.forEach(e -> orderDetails.addAll(e.getOrderDetails() == null ? new ArrayList<>() : e.getOrderDetails()));
//        orderDetailService.wrapAppDetails(orderDetails);
//        orderHeadService.wrapOrderAppButton(orderHeads, null);
//        // 商品数量
//        List<OrderHead> orderQtyDetails = orderHeadService.querySumQuantityByOrderNosAndDetailTypes(CollectionUtil.toList(orderHeads, OrderHead::getOrderNo));
//        Map<String, OrderHead> qtyDetailMap = CollectionUtil.toMap(orderQtyDetails, OrderHead::getOrderNo);
//        orderHeads.forEach(e -> e.setItemTotalQty(qtyDetailMap.get(e.getOrderNo()) == null ? BigDecimal.ZERO : qtyDetailMap.get(e.getOrderNo()).getItemTotalQty()));
//        return pageList;
//    }